package cn.edu.niit.alienlab.jshttplessonserver.dto;

import com.alibaba.fastjson.JSONObject;

import java.time.LocalDateTime;

public class HeroInfo {
    /*英雄id**/
    Integer heroId;
    /*英雄名称**/
    String name;
    /*英雄称号**/
    String nickname;
    /*英雄分类**/
    String category;
    /*英雄头像**/
    String icon;
    /*英雄金币金额**/
    Integer gold;
    /*钻石金额**/
    Integer diamond;
    /*点券金额**/
    Integer ticket;
    /*英雄定位**/
    String tag;
    /*英雄生存能力**/
    Integer abilityHp;
    /*英雄攻击伤害能力**/
    Integer abilityAttack;
    /*英雄技能效果**/
    Integer abilitySkill;
    /*英雄操控难度**/
    Integer abilityDiff;
    /*最后一次出战时间**/
    LocalDateTime lastTime;

    public HeroInfo(){}

    public HeroInfo(JSONObject heroJson){
        this.heroId=heroJson.getInteger("hero_id");
        this.name=heroJson.getString("name");
        this.nickname=heroJson.getString("nickname");
        this.category=heroJson.getString("category");
        this.icon=heroJson.getString("icon");
        this.gold=heroJson.getInteger("gold");
        this.diamond=heroJson.getInteger("diamond");
        this.ticket=heroJson.getInteger("ticket");
        this.tag=heroJson.getString("tag");
        this.abilityHp=heroJson.getInteger("ability_hp");
        this.abilityAttack=heroJson.getInteger("ability_attack");
        this.abilitySkill=heroJson.getInteger("ability_skill");
        this.abilityDiff=heroJson.getInteger("ability_diff");
    }

    public Integer getHeroId() {
        return heroId;
    }

    public void setHeroId(Integer heroId) {
        this.heroId = heroId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getNickname() {
        return nickname;
    }

    public void setNickname(String nickname) {
        this.nickname = nickname;
    }

    public String getCategory() {
        return category;
    }

    public void setCategory(String category) {
        this.category = category;
    }

    public String getIcon() {
        return icon;
    }

    public void setIcon(String icon) {
        this.icon = icon;
    }

    public Integer getGold() {
        return gold;
    }

    public void setGold(Integer gold) {
        this.gold = gold;
    }

    public Integer getDiamond() {
        return diamond;
    }

    public void setDiamond(Integer diamond) {
        this.diamond = diamond;
    }

    public Integer getTicket() {
        return ticket;
    }

    public void setTicket(Integer ticket) {
        this.ticket = ticket;
    }

    public String getTag() {
        return tag;
    }

    public void setTag(String tag) {
        this.tag = tag;
    }

    public Integer getAbilityHp() {
        return abilityHp;
    }

    public void setAbilityHp(Integer abilityHp) {
        this.abilityHp = abilityHp;
    }

    public Integer getAbilityAttack() {
        return abilityAttack;
    }

    public void setAbilityAttack(Integer abilityAttack) {
        this.abilityAttack = abilityAttack;
    }

    public Integer getAbilitySkill() {
        return abilitySkill;
    }

    public void setAbilitySkill(Integer abilitySkill) {
        this.abilitySkill = abilitySkill;
    }

    public Integer getAbilityDiff() {
        return abilityDiff;
    }

    public void setAbilityDiff(Integer abilityDiff) {
        this.abilityDiff = abilityDiff;
    }

    public LocalDateTime getLastTime() {
        return lastTime;
    }

    public void setLastTime(LocalDateTime lastTime) {
        this.lastTime = lastTime;
    }
}
